str="BBBBBWWBBWBWBWWWBWBWBBBBWBBBBWBWBWBWBWWBWWBWBWWWWBBWWWWBWWWWBWBBWBBWBBWWW"
function arrhowmuschw(blocks, k) {
    let count = 0
    for (let i = 0; i < k; i++) {
        if (blocks[i] == 'W') {
            count++
        }
    }
    console.log(count)
    return count
}
console.log(arrhowmuschw(str, 29))
